GPU VA (Virtual Address)

  • It's a virtual pointer inside the GPU’s virtual address space that the GPU and drivers use to reference device memory.

  • It is not a physical address; the GPU MMU translates it to physical backing memory.

64-bit vs 32-bit VA

  • 64-bit : Default for general buffers.

  • 32-bit : Used for descriptors (e.g., VK_EXT_descriptor_buffer  saves memory).

MMU Translation

  • GPU VA → Physical address (VRAM or system RAM) via page tables.

  • Fault Handling : Driver-managed page faults (sparse residency).

Vulkan

  • Feature exposure :

    • Vulkan exposes GPU virtual addresses via a feature/extension set (commonly VK_KHR_buffer_device_address  / Vulkan 1.2 core feature). An implementation must advertise and the application must enable the corresponding feature(s) at device creation to use GPU addresses.

  • Buffer creation and usage bits :

    • To obtain a GPU VA for a buffer, the buffer must be created with the shader/device-address usage bit (e.g. VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT ) so the implementation knows the buffer will be addressable.

  • Memory binding :

    • The buffer’s memory must be allocated and bound as usual.

    • The GPU VA refers to the buffer object while that memory is bound.

  • Querying the address :

    • Vulkan provides an API (e.g. vkGetBufferDeviceAddress  with a VkBufferDeviceAddressInfo ) that returns a 64-bit GPU address for the buffer or memory object. That value is a device-virtual address suitable for use by GPU code or by other Vulkan objects that accept device addresses (acceleration structures, device address based pointer data, etc.).

  • Using the address in shaders / GPU code :

    • The address can be passed to shaders (e.g., as a 64-bit integer pushed into a descriptor or push constant) and used by shaders that support buffer-address operations (SPIR-V features / shader capability required). Ray-tracing acceleration structures and some GPU pointer-chasing data structures commonly rely on device addresses.

  • Driver/GPU translation and constraints :

    • The GPU VA is translated by the GPU MMU. The value is only valid while the buffer’s memory remains bound and resident. If memory is freed, reallocated, or pages are made non-resident (sparse binding), dereferencing the GPU VA causes undefined behavior or faults.

  • VK_EXT_descriptor_buffer :

    • On some drivers, descriptor buffers live in a restricted GPU VA space, which allows those drivers to only spend 32-bits instead of 64-bits to bind a descriptor VA.

    • This VA range is precious. On these drivers, you’ll likely see new memory types that allocate 32-bit VA under the hood.